package com.jotal.consumer_services.controller;

import com.jotal.api.*;
import com.jotal.api.response.BaseResult;
import org.apache.dubbo.config.annotation.DubboReference;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description:
 * @author: Jotal
 * @time: 2021/1/22 16:23
 */
@RestController
@RequestMapping("/demo")
public class demoController {

    private static final Logger log = LoggerFactory.getLogger(demoController.class);

    @DubboReference
    private demoApi demoApi;


    @GetMapping
    public BaseResult demo(@RequestParam String param) {
        log.info("------------------param:{}", param);
        return demoApi.demo();
    }
}
